﻿<UserControl
	x:Class="TestGUI.Page2"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:me="clr-namespace:TestGUI"
	xmlns:MVVMSL="clr-namespace:Riba.MVVMSL;assembly=RibaMVVMSL" 
	mc:Ignorable="d" d:DesignHeight="250" d:DesignWidth="300"
>
	<UserControl.DataContext>
		<me:Page2ViewModel/>
	</UserControl.DataContext>

	<UserControl.Resources>
		<Style TargetType="MVVMSL:NavigatorControl">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="MVVMSL:NavigatorControl">
						<Border
							Background="{TemplateBinding Background}"
							BorderBrush="{TemplateBinding BorderBrush}"
							BorderThickness="{TemplateBinding BorderThickness}"
						>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="TransitionStates">
									<VisualState x:Name="Initial" />

									<VisualState x:Name="EndAnimationForward">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames x:Name="RotateClockWiseFrom" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentControl1">
												<EasingDoubleKeyFrame KeyTime="0" Value="1" />
												<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0" />
											</DoubleAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames x:Name="RotateClockWiseTo" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentControl2">
												<EasingDoubleKeyFrame KeyTime="0" Value="0" />
												<EasingDoubleKeyFrame KeyTime="0:0:2" Value="1" />
											</DoubleAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames
												Storyboard.TargetName="ContentControl1"
												Storyboard.TargetProperty="Visibility"
											>
												<DiscreteObjectKeyFrame KeyTime="0:0:2" Value="Collapsed" />
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>

									<VisualState x:Name="EndAnimationBackward">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames x:Name="RotateCounterClockWiseFrom" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentControl2">
												<EasingDoubleKeyFrame KeyTime="0" Value="1" />
												<EasingDoubleKeyFrame KeyTime="0:0:2" Value="0" />
											</DoubleAnimationUsingKeyFrames>
											<DoubleAnimationUsingKeyFrames x:Name="RotateCounterClockWiseTo" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ContentControl1">
												<EasingDoubleKeyFrame KeyTime="0" Value="0" />
												<EasingDoubleKeyFrame KeyTime="0:0:2" Value="1" />
											</DoubleAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames
												Storyboard.TargetName="ContentControl2"
												Storyboard.TargetProperty="Visibility"
											>
												<DiscreteObjectKeyFrame KeyTime="0:0:2" Value="Collapsed" />
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>

							<Grid>
								<ContentControl x:Name="ContentControl1" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
								<ContentControl x:Name="ContentControl2" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
							</Grid>
						</Border>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Resources>

	<Border Background="Aquamarine">
		<Grid>
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto" />
				<RowDefinition Height="Auto" />
				<RowDefinition Height="Auto" />
				<RowDefinition />
				<RowDefinition Height="Auto" />
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="100" />
				<ColumnDefinition />
			</Grid.ColumnDefinitions>

			<MVVMSL:ViewEventHandlerControl />

			<TextBlock Text="Page2" Grid.ColumnSpan="2" />

			<TextBlock Text="ExchangeData" Grid.Row="1" />
			<TextBox Text="{Binding ExchangeData, Mode=TwoWay}" Grid.Row="1" Grid.Column="1" />

			<TextBlock Text="PrivateData" Grid.Row="2" />
			<TextBox Text="{Binding PrivateData, Mode=TwoWay}" Grid.Row="2" Grid.Column="1" />

			<TextBlock Text="Wizard" Grid.Row="3" />
			<MVVMSL:NavigatorControl Grid.Row="3" Grid.Column="1" />

			<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="4" Grid.Column="1">
				<Button Content="Zurück" Command="{Binding CommandNavigateWizardBack}" />
				<Button Content="Weiter" Command="{Binding CommandNavigateWizardForward}" />
			</StackPanel>
		</Grid>
	</Border>
</UserControl>